package com.sy.simpleegg.room.entity

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.Ignore
import androidx.room.PrimaryKey
import com.sy.simpleegg.constant.SaveCoinStep
import com.sy.simpleegg.util.DateTimeUtil


@Entity(tableName = "tb_save_coin")
data class SaveCoinEntity(
    @PrimaryKey(autoGenerate = true) var id: Long = 0,
    @ColumnInfo(name = "sn") var sn: String = "",//订单号
    @ColumnInfo(name = "uid") var uid: String = "",//用户id
    @ColumnInfo(name = "coins") var coins: String = "0",//存币数
    @ColumnInfo(name = "step") var step: Int = SaveCoinStep.SAVING,//0-存币中 1-存币结束 2-上报完成
    @ColumnInfo(name = "date") var date: String = DateTimeUtil.nowDate2,//yyyyMMdd
    @ColumnInfo(name = "time") var time: String = DateTimeUtil.nowDateTime2//HHmmss
){
    @Ignore()
    constructor(): this(0)
}
